package com.example.demo.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.demo.domain.User;
import com.example.demo.service.UserRemoteService;
import com.example.demo.service.UserService;
import org.springframework.stereotype.Service;

/**
 * 用户接口实现
 * @date 2019-4-10 15:34:12
 * @author joker
 */
@Service
public class UserServiceImpl implements UserService {

    @Reference
    private UserRemoteService userRemoteService;


    /**
     * 通过用户ID查询用户
     *
     * @param userId 用户ID
     * @return User
     */
    @Override
    public User getUserInfo(Integer userId) {
        return userRemoteService.getUserById(userId);
    }
}
